package generator.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName t_login
 */
@TableName(value ="t_login")
public class Login implements Serializable {
    /**
     * 主键，自增
     */
    @TableId(type = IdType.AUTO)
    private Integer userId;

    /**
     * 登录账号
     */
    private String userAccount;

    /**
     * 登录密码
     */
    private String userPwd;

    /**
     * 用户昵称
     */
    private String userName;

    /**
     * MD5加密盐
     */
    private String userSalt;

    /**
     * 加密盐的索引
     */
    private Integer userIndex;

    /**
     * 用户状态，1-禁用，0正常
     */
    private Integer userStatus;

    /**
     * 错误次数，连续4次密码错误账户锁定
     */
    private Integer userError;

    /**
     * 所属员工编号，外键
     */
    private Integer userNo;

    /**
     * 角色id，角色表外键
     */
    private Integer userRoleId;

    /**
     * 创建时间
     */
    private String userCreateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 主键，自增
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * 主键，自增
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * 登录账号
     */
    public String getUserAccount() {
        return userAccount;
    }

    /**
     * 登录账号
     */
    public void setUserAccount(String userAccount) {
        this.userAccount = userAccount;
    }

    /**
     * 登录密码
     */
    public String getUserPwd() {
        return userPwd;
    }

    /**
     * 登录密码
     */
    public void setUserPwd(String userPwd) {
        this.userPwd = userPwd;
    }

    /**
     * 用户昵称
     */
    public String getUserName() {
        return userName;
    }

    /**
     * 用户昵称
     */
    public void setUserName(String userName) {
        this.userName = userName;
    }

    /**
     * MD5加密盐
     */
    public String getUserSalt() {
        return userSalt;
    }

    /**
     * MD5加密盐
     */
    public void setUserSalt(String userSalt) {
        this.userSalt = userSalt;
    }

    /**
     * 加密盐的索引
     */
    public Integer getUserIndex() {
        return userIndex;
    }

    /**
     * 加密盐的索引
     */
    public void setUserIndex(Integer userIndex) {
        this.userIndex = userIndex;
    }

    /**
     * 用户状态，1-禁用，0正常
     */
    public Integer getUserStatus() {
        return userStatus;
    }

    /**
     * 用户状态，1-禁用，0正常
     */
    public void setUserStatus(Integer userStatus) {
        this.userStatus = userStatus;
    }

    /**
     * 错误次数，连续4次密码错误账户锁定
     */
    public Integer getUserError() {
        return userError;
    }

    /**
     * 错误次数，连续4次密码错误账户锁定
     */
    public void setUserError(Integer userError) {
        this.userError = userError;
    }

    /**
     * 所属员工编号，外键
     */
    public Integer getUserNo() {
        return userNo;
    }

    /**
     * 所属员工编号，外键
     */
    public void setUserNo(Integer userNo) {
        this.userNo = userNo;
    }

    /**
     * 角色id，角色表外键
     */
    public Integer getUserRoleId() {
        return userRoleId;
    }

    /**
     * 角色id，角色表外键
     */
    public void setUserRoleId(Integer userRoleId) {
        this.userRoleId = userRoleId;
    }

    /**
     * 创建时间
     */
    public String getUserCreateTime() {
        return userCreateTime;
    }

    /**
     * 创建时间
     */
    public void setUserCreateTime(String userCreateTime) {
        this.userCreateTime = userCreateTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Login other = (Login) that;
        return (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getUserAccount() == null ? other.getUserAccount() == null : this.getUserAccount().equals(other.getUserAccount()))
            && (this.getUserPwd() == null ? other.getUserPwd() == null : this.getUserPwd().equals(other.getUserPwd()))
            && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName()))
            && (this.getUserSalt() == null ? other.getUserSalt() == null : this.getUserSalt().equals(other.getUserSalt()))
            && (this.getUserIndex() == null ? other.getUserIndex() == null : this.getUserIndex().equals(other.getUserIndex()))
            && (this.getUserStatus() == null ? other.getUserStatus() == null : this.getUserStatus().equals(other.getUserStatus()))
            && (this.getUserError() == null ? other.getUserError() == null : this.getUserError().equals(other.getUserError()))
            && (this.getUserNo() == null ? other.getUserNo() == null : this.getUserNo().equals(other.getUserNo()))
            && (this.getUserRoleId() == null ? other.getUserRoleId() == null : this.getUserRoleId().equals(other.getUserRoleId()))
            && (this.getUserCreateTime() == null ? other.getUserCreateTime() == null : this.getUserCreateTime().equals(other.getUserCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getUserAccount() == null) ? 0 : getUserAccount().hashCode());
        result = prime * result + ((getUserPwd() == null) ? 0 : getUserPwd().hashCode());
        result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode());
        result = prime * result + ((getUserSalt() == null) ? 0 : getUserSalt().hashCode());
        result = prime * result + ((getUserIndex() == null) ? 0 : getUserIndex().hashCode());
        result = prime * result + ((getUserStatus() == null) ? 0 : getUserStatus().hashCode());
        result = prime * result + ((getUserError() == null) ? 0 : getUserError().hashCode());
        result = prime * result + ((getUserNo() == null) ? 0 : getUserNo().hashCode());
        result = prime * result + ((getUserRoleId() == null) ? 0 : getUserRoleId().hashCode());
        result = prime * result + ((getUserCreateTime() == null) ? 0 : getUserCreateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", userId=").append(userId);
        sb.append(", userAccount=").append(userAccount);
        sb.append(", userPwd=").append(userPwd);
        sb.append(", userName=").append(userName);
        sb.append(", userSalt=").append(userSalt);
        sb.append(", userIndex=").append(userIndex);
        sb.append(", userStatus=").append(userStatus);
        sb.append(", userError=").append(userError);
        sb.append(", userNo=").append(userNo);
        sb.append(", userRoleId=").append(userRoleId);
        sb.append(", userCreateTime=").append(userCreateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}